From: Stefan Monnier Date: Tue, 2 Mar 2004 21:45:06 +0000 (+0000) Subject: (xml-get-attribute-or-nil): Simplify. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23833 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e761498a6d34e725dc32718f0b5830aa6c3883b0;p=emacs.git (xml-get-attribute-or-nil): Simplify. --- diff --git a/lisp/xml.el b/lisp/xml.el index dbd991f5583..61a79b37104 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -1,6 +1,6 @@ ;;; xml.el --- XML parser -;; Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2000, 01, 03, 2004 Free Software Foundation, Inc. ;; Author: Emmanuel Briot ;; Maintainer: Mark A. Hershberger @@ -109,10 +109,7 @@ CHILD-NAME should be a lower case symbol." Return `nil' if the attribute was not found. See also `xml-get-attribute'." - (when (xml-node-attributes node) - (let ((value (assoc attribute (xml-node-attributes node)))) - (when value - (cdr value))))) + (cdr (assoc attribute (xml-node-attributes node)))) (defsubst xml-get-attribute (node attribute) "Get from NODE the value of ATTRIBUTE.